package cn.asiainfo.apportion.po;

import java.util.ArrayList;
import java.util.List;

public class BuApportionRateExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public BuApportionRateExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andApportionRateTypeIsNull() {
            addCriterion("APPORTION_RATE_TYPE is null");
            return (Criteria) this;
        }

        public Criteria andApportionRateTypeIsNotNull() {
            addCriterion("APPORTION_RATE_TYPE is not null");
            return (Criteria) this;
        }

        public Criteria andApportionRateTypeEqualTo(String value) {
            addCriterion("APPORTION_RATE_TYPE =", value, "apportionRateType");
            return (Criteria) this;
        }

        public Criteria andApportionRateTypeNotEqualTo(String value) {
            addCriterion("APPORTION_RATE_TYPE <>", value, "apportionRateType");
            return (Criteria) this;
        }

        public Criteria andApportionRateTypeGreaterThan(String value) {
            addCriterion("APPORTION_RATE_TYPE >", value, "apportionRateType");
            return (Criteria) this;
        }

        public Criteria andApportionRateTypeGreaterThanOrEqualTo(String value) {
            addCriterion("APPORTION_RATE_TYPE >=", value, "apportionRateType");
            return (Criteria) this;
        }

        public Criteria andApportionRateTypeLessThan(String value) {
            addCriterion("APPORTION_RATE_TYPE <", value, "apportionRateType");
            return (Criteria) this;
        }

        public Criteria andApportionRateTypeLessThanOrEqualTo(String value) {
            addCriterion("APPORTION_RATE_TYPE <=", value, "apportionRateType");
            return (Criteria) this;
        }

        public Criteria andApportionRateTypeLike(String value) {
            addCriterion("APPORTION_RATE_TYPE like", value, "apportionRateType");
            return (Criteria) this;
        }

        public Criteria andApportionRateTypeNotLike(String value) {
            addCriterion("APPORTION_RATE_TYPE not like", value, "apportionRateType");
            return (Criteria) this;
        }

        public Criteria andApportionRateTypeIn(List<String> values) {
            addCriterion("APPORTION_RATE_TYPE in", values, "apportionRateType");
            return (Criteria) this;
        }

        public Criteria andApportionRateTypeNotIn(List<String> values) {
            addCriterion("APPORTION_RATE_TYPE not in", values, "apportionRateType");
            return (Criteria) this;
        }

        public Criteria andApportionRateTypeBetween(String value1, String value2) {
            addCriterion("APPORTION_RATE_TYPE between", value1, value2, "apportionRateType");
            return (Criteria) this;
        }

        public Criteria andApportionRateTypeNotBetween(String value1, String value2) {
            addCriterion("APPORTION_RATE_TYPE not between", value1, value2, "apportionRateType");
            return (Criteria) this;
        }

        public Criteria andLocalCallIsNull() {
            addCriterion("LOCAL_CALL is null");
            return (Criteria) this;
        }

        public Criteria andLocalCallIsNotNull() {
            addCriterion("LOCAL_CALL is not null");
            return (Criteria) this;
        }

        public Criteria andLocalCallEqualTo(Integer value) {
            addCriterion("LOCAL_CALL =", value, "localCall");
            return (Criteria) this;
        }

        public Criteria andLocalCallNotEqualTo(Integer value) {
            addCriterion("LOCAL_CALL <>", value, "localCall");
            return (Criteria) this;
        }

        public Criteria andLocalCallGreaterThan(Integer value) {
            addCriterion("LOCAL_CALL >", value, "localCall");
            return (Criteria) this;
        }

        public Criteria andLocalCallGreaterThanOrEqualTo(Integer value) {
            addCriterion("LOCAL_CALL >=", value, "localCall");
            return (Criteria) this;
        }

        public Criteria andLocalCallLessThan(Integer value) {
            addCriterion("LOCAL_CALL <", value, "localCall");
            return (Criteria) this;
        }

        public Criteria andLocalCallLessThanOrEqualTo(Integer value) {
            addCriterion("LOCAL_CALL <=", value, "localCall");
            return (Criteria) this;
        }

        public Criteria andLocalCallIn(List<Integer> values) {
            addCriterion("LOCAL_CALL in", values, "localCall");
            return (Criteria) this;
        }

        public Criteria andLocalCallNotIn(List<Integer> values) {
            addCriterion("LOCAL_CALL not in", values, "localCall");
            return (Criteria) this;
        }

        public Criteria andLocalCallBetween(Integer value1, Integer value2) {
            addCriterion("LOCAL_CALL between", value1, value2, "localCall");
            return (Criteria) this;
        }

        public Criteria andLocalCallNotBetween(Integer value1, Integer value2) {
            addCriterion("LOCAL_CALL not between", value1, value2, "localCall");
            return (Criteria) this;
        }

        public Criteria andLongDistancesIsNull() {
            addCriterion("LONG_DISTANCES is null");
            return (Criteria) this;
        }

        public Criteria andLongDistancesIsNotNull() {
            addCriterion("LONG_DISTANCES is not null");
            return (Criteria) this;
        }

        public Criteria andLongDistancesEqualTo(Integer value) {
            addCriterion("LONG_DISTANCES =", value, "longDistances");
            return (Criteria) this;
        }

        public Criteria andLongDistancesNotEqualTo(Integer value) {
            addCriterion("LONG_DISTANCES <>", value, "longDistances");
            return (Criteria) this;
        }

        public Criteria andLongDistancesGreaterThan(Integer value) {
            addCriterion("LONG_DISTANCES >", value, "longDistances");
            return (Criteria) this;
        }

        public Criteria andLongDistancesGreaterThanOrEqualTo(Integer value) {
            addCriterion("LONG_DISTANCES >=", value, "longDistances");
            return (Criteria) this;
        }

        public Criteria andLongDistancesLessThan(Integer value) {
            addCriterion("LONG_DISTANCES <", value, "longDistances");
            return (Criteria) this;
        }

        public Criteria andLongDistancesLessThanOrEqualTo(Integer value) {
            addCriterion("LONG_DISTANCES <=", value, "longDistances");
            return (Criteria) this;
        }

        public Criteria andLongDistancesIn(List<Integer> values) {
            addCriterion("LONG_DISTANCES in", values, "longDistances");
            return (Criteria) this;
        }

        public Criteria andLongDistancesNotIn(List<Integer> values) {
            addCriterion("LONG_DISTANCES not in", values, "longDistances");
            return (Criteria) this;
        }

        public Criteria andLongDistancesBetween(Integer value1, Integer value2) {
            addCriterion("LONG_DISTANCES between", value1, value2, "longDistances");
            return (Criteria) this;
        }

        public Criteria andLongDistancesNotBetween(Integer value1, Integer value2) {
            addCriterion("LONG_DISTANCES not between", value1, value2, "longDistances");
            return (Criteria) this;
        }

        public Criteria andRoamCallIsNull() {
            addCriterion("ROAM_CALL is null");
            return (Criteria) this;
        }

        public Criteria andRoamCallIsNotNull() {
            addCriterion("ROAM_CALL is not null");
            return (Criteria) this;
        }

        public Criteria andRoamCallEqualTo(Integer value) {
            addCriterion("ROAM_CALL =", value, "roamCall");
            return (Criteria) this;
        }

        public Criteria andRoamCallNotEqualTo(Integer value) {
            addCriterion("ROAM_CALL <>", value, "roamCall");
            return (Criteria) this;
        }

        public Criteria andRoamCallGreaterThan(Integer value) {
            addCriterion("ROAM_CALL >", value, "roamCall");
            return (Criteria) this;
        }

        public Criteria andRoamCallGreaterThanOrEqualTo(Integer value) {
            addCriterion("ROAM_CALL >=", value, "roamCall");
            return (Criteria) this;
        }

        public Criteria andRoamCallLessThan(Integer value) {
            addCriterion("ROAM_CALL <", value, "roamCall");
            return (Criteria) this;
        }

        public Criteria andRoamCallLessThanOrEqualTo(Integer value) {
            addCriterion("ROAM_CALL <=", value, "roamCall");
            return (Criteria) this;
        }

        public Criteria andRoamCallIn(List<Integer> values) {
            addCriterion("ROAM_CALL in", values, "roamCall");
            return (Criteria) this;
        }

        public Criteria andRoamCallNotIn(List<Integer> values) {
            addCriterion("ROAM_CALL not in", values, "roamCall");
            return (Criteria) this;
        }

        public Criteria andRoamCallBetween(Integer value1, Integer value2) {
            addCriterion("ROAM_CALL between", value1, value2, "roamCall");
            return (Criteria) this;
        }

        public Criteria andRoamCallNotBetween(Integer value1, Integer value2) {
            addCriterion("ROAM_CALL not between", value1, value2, "roamCall");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}